
var target = UIATarget.localTarget();
target.frontMostApp().mainWindow().buttons()["YOUR REPORT"].tap();
// Alert detected. Expressions for handling alerts should be moved into the UIATarget.onAlert function definition.
try{
target.frontMostApp().alert().defaultButton().tap();
}
catch(e)
{
UIALogger.logMessage("No alert to close"); 
}
UIATarget.localTarget().delay(1);
target.frontMostApp().mainWindow().buttons()["FORUMS"].tap();
UIATarget.localTarget().delay(1);
target.frontMostApp().mainWindow().navigationBar().rightButton().tap();
UIATarget.localTarget().delay(1);
target.frontMostApp().mainWindow().buttons()["BLOGS"].tap();
UIATarget.localTarget().delay(1);
target.frontMostApp().mainWindow().navigationBar().rightButton().tap();

target.frontMostApp().mainWindow().elements()["Video"].tapWithOptions({tapOffset:{x:0.31, y:0.17}});
target.frontMostApp().mainWindow().buttons()["Full screen"].tap();
target.frontMostApp().mainWindow().elements()["Video"].tapWithOptions({tapOffset:{x:0.04, y:0.25}});
target.frontMostApp().mainWindow().navigationBar().leftButton().tap();

UIALogger.logStart("Starting orientation tests"); 

target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_LANDSCAPELEFT);
UIATarget.localTarget().delay(1);
target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT);

UIALogger.logPass("Passed orientation tests"); 